﻿using System;

namespace SystemX.Infrastructure
{
	/// <summary>
	/// Name value pair.This struct is similar to KeyValuePair(System.Collections.Generic).
	/// </summary>
	/// <typeparam name="TName"></typeparam>
	/// <typeparam name="TValue"></typeparam>
	/// <remarks>
	/// This struct is designed specially for JQuery.js framework.
	/// Jquery's serializeArray method WILL serialize a set of form elements to a NameValuePair array.
	/// <example>
	/// 	<code>$(":input").filter("[name^='MY_']").serializeArray();</code>
	/// Will produce something like:
	///		<code>[{name:'MY_name1',value:'xxxx'},{name:'MY_name2',value:'yyyy'}]</code>
	/// </example>
	/// </remarks>
	public struct NameValuePair<TName,TValue>
	{
		public TName name { get; set; }
		public TValue value { get; set; }
	}
}
